<template>
  <div class="treebox">
    <indexItem
      :data="data"
      :config="prop"
      :index="index"
      :item="item"
      v-for="(item, index) in data"
      :key="index"
    >
      <template #treeIcon>
        <slot name="treeIcon"></slot>
      </template>
    </indexItem>
  </div>
</template>

<script setup name="tree">
import indexItem from './indexItem.vue'
const props = defineProps({
  data: {
    type: Object,
    default: () => { }
  },
  lineClolr: {
    type: String,
    default: '#999093'
  },

  prop: {
    type: Object,
    default: {
      children: 'children',
      lable: 'lable',
      value: 'value'
    }
  }
})
</script>

<style lang="scss" scoped>
.treebox {
  height: 100%;
  width: 100%;
}
// 图标样式
img {
  width: 1.9375rem;
  height: 1.9375rem;
}
</style>
